#!/usr/bin/env bash
set -e

# 1) 创建干净 venv
python3 -m venv build_env
source build_env/bin/activate

# 2) 安装依赖
pip install --upgrade pip
pip install -r requirements.txt

# 3) 打包
pyinstaller telegram_scraper.spec

# 4) 输出路径
echo "可执行文件已生成：dist/telegram_scraper"